import 'package:flutter/material.dart';

class DrawDemo extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return Drawer(
      elevation: 12,
      child: ListView(
        children: <Widget>[
          UserAccountsDrawerHeader(
            accountName: Text(
              'yca',
              style: TextStyle(fontWeight: FontWeight.bold),
            ),
            accountEmail: Text(
              '9232@qq.com',
              style: TextStyle(color: Colors.grey),
            ),
            currentAccountPicture: CircleAvatar(
              backgroundImage: NetworkImage(
                  'https://p.ssl.qhimg.com/dmfd/400_300_/t0120b2f23b554b8402.jpg'),
            ),
            decoration: BoxDecoration(
              color: Colors.yellowAccent,
              image: DecorationImage(
                  image: NetworkImage(
                      'https://p.ssl.qhimg.com/dmfd/400_300_/t0120b2f23b554b8402.jpg'),
                  fit: BoxFit.cover,
                  colorFilter:
                      ColorFilter.mode(Colors.black54, BlendMode.overlay)),
            ),
          ),
          ListTile(
            title: Text(
              'Message',
              textAlign: TextAlign.left,
            ),
            leading: Icon(
              Icons.message,
              color: Colors.black12,
              size: 32,
            ),
            contentPadding: EdgeInsets.symmetric(horizontal: 16),
            onTap: () => Navigator.pop(context),
          ),
          ListTile(
            title: Text(
              'Favorite',
              textAlign: TextAlign.left,
            ),
            leading: Icon(
              Icons.favorite,
              color: Colors.black12,
              size: 32,
            ),
            onTap: () => Navigator.pop(context),
          ),
          ListTile(
            title: Text(
              'Report',
              textAlign: TextAlign.left,
            ),
            leading: Icon(
              Icons.report,
              color: Colors.black12,
              size: 32,
            ),
            onTap: () => Navigator.pop(context),
          ),
          ListTile(
            title: Text(
              'Setting',
              textAlign: TextAlign.left,
            ),
            leading: Icon(
              Icons.settings,
              color: Colors.black12,
              size: 32,
            ),
            onTap: () => Navigator.pop(context),
          )
        ],
      ),
    );
  }
}
